package ace.module.product.core.impl.dao.entity;

import jakarta.annotation.Nullable;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;
import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.GenericPageContent;
import ace.module.product.api.model.dto.PmsProductCategoryRelationDto;

/**
* 商品与分类关系.
*
* @author Caspar
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = PmsProductCategoryRelationDto.TABLE_DESC)
@Table(PmsProductCategoryRelationDto.TABLE_NAME)
public class PmsProductCategoryRelation implements Serializable, GenericPageContent<Long> {

  @Id
  @Schema(title = PmsProductCategoryRelationDto.ID_TITLE, description = PmsProductCategoryRelationDto.ID_DESC)
  private Long id;

  @Schema(title = PmsProductCategoryRelationDto.PMS_APP_ID_TITLE, description = PmsProductCategoryRelationDto.PMS_APP_ID_DESC)
  private Long pmsAppId;

  @Schema(title = PmsProductCategoryRelationDto.PRODUCT_ID_TITLE, description = PmsProductCategoryRelationDto.PRODUCT_ID_DESC)
  private Long productId;

  @Schema(title = PmsProductCategoryRelationDto.CATEGORY_ID_TITLE, description = PmsProductCategoryRelationDto.CATEGORY_ID_DESC)
  private Long categoryId;

  @Schema(title = PmsProductCategoryRelationDto.CATEGORY_TYPE_TITLE, description = PmsProductCategoryRelationDto.CATEGORY_TYPE_DESC)
  private Integer categoryType;

  @Schema(title = PmsProductCategoryRelationDto.CATEGORY_TYPE_KEY_TITLE, description = PmsProductCategoryRelationDto.CATEGORY_TYPE_KEY_DESC)
  private Long categoryTypeKey;

  @LogicDelete
  @Schema(title = PmsProductCategoryRelationDto.DELETE_FLAG_TITLE, description = PmsProductCategoryRelationDto.DELETE_FLAG_DESC)
  private Long deleteFlag;

  @CreatedDate
  @Schema(title = PmsProductCategoryRelationDto.CREATE_TIME_TITLE, description = PmsProductCategoryRelationDto.CREATE_TIME_DESC)
  private Long createTime;

  @LastModifiedDate
  @Schema(title = PmsProductCategoryRelationDto.UPDATE_TIME_TITLE, description = PmsProductCategoryRelationDto.UPDATE_TIME_DESC)
  private Long updateTime;

  @Version
  @Schema(title = PmsProductCategoryRelationDto.ROW_VERSION_TITLE, description = PmsProductCategoryRelationDto.ROW_VERSION_DESC)
  private Long rowVersion;

}
